﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using WURFL;
using Nucleo.Wurfl;


namespace System.Web
{
	public static class HttpContextExtensions
	{
		public static IDevice GetDevice(this HttpContext view)
		{
			var mgr = WurflDeviceManager.GetManager();
			return mgr.GetDeviceForRequest(view.Request);
		}

		public static IDevice GetDevice(this HttpContextBase view)
		{
			var mgr = WurflDeviceManager.GetManager();
			return mgr.GetDeviceForRequest(HttpContext.Current.Request);
		}

		public static IWURFLManager GetDeviceManager(this HttpContext view)
		{
			return WurflDeviceManager.GetManager();
		}

		public static IWURFLManager GetDeviceManager(this HttpContextBase view)
		{
			
			return WurflDeviceManager.GetManager();
		}
	}
}
